﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using System.Text;

namespace Pazinga
{
    public class MissleFire
    {

        /// <summary>
        /// Create new missle fire object
        /// </summary>
        /// <param name="vec"></param>
        public MissleFire(Vector2 vec) 
        {
            //set X axis value
            X = vec.X;

            //set Y axis value
            Y = vec.Y;
        }

        /// <summary>
        /// Update the place of the missle
        /// </summary>
        public void Update()
        {       
            //drop down the missle by increasing te Y axis value
            Y+=10;
        }

        /// <summary>
        /// Gets or Sets Missle X axis
        /// </summary>
        public float X
        { set; get; }

        /// <summary>
        /// Gets or Sets Missle Y axis
        /// </summary>
        public float Y
        { set; get; }

        /// <summary>
        /// Gets the TankFire Position
        /// </summary>
        public Vector2 Position
        {
            //return new vector2 object from X and Y axis 
            get { return new Vector2(X, Y); }
        }

        /// <summary>
        /// Gets or Sets MissleFire Health
        /// </summary>
        public float Health
        {
            get;
            set;
        }

        public void DrawMissleFire(SpriteBatch sp, Texture2D Tex)
        {
            sp.Draw(Tex, Position, Color.White);
        }
    }
}
